package larpplanner.gui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
/**
 * use this static class to generate an informative error message to the client
 */
public class PopMessage{

	private PopMessage(){}
	
	public static void errorMessage(String msg) {
		Display display = Display.getDefault();
		Shell shell = new Shell(display);
		MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR);
		mb.setText("error");
		mb.setMessage(msg);
		mb.open();
	}
	
	public static void notifyMessage(String msg) {
		Display display = Display.getDefault();
		Shell shell = new Shell(display);
		MessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION);
		mb.setMessage(msg);
		mb.open();
	}

}
